/* 主要样式文件 */
.web3Demo {
  min-height: 100vh;
  background-color: #f5f5f5;
}

.header {
  background-color: #0070f3;
  color: white;
  padding: 1rem;
  text-align: center;
}

.content {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

h1 {
  color: #333;
  margin-bottom: 30px;
  text-align: center;
}

h2 {
  color: #555;
  margin: 20px 0 15px;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 8px;
}

h3 {
  color: #555;
  margin: 20px 0 15px;
  font-size: 18px;
}

/* 卡片切换标签样式 */
.cardTabs {
  display: flex;
  border-bottom: 2px solid #f0f0f0;
  margin-bottom: 20px;
  overflow-x: auto;
  white-space: nowrap;
}

.cardTab {
  padding: 12px 24px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  color: #666;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
  flex-shrink: 0;
}

.cardTab:hover:not(.active) {
  color: #333;
  background: #f5f5f5;
}

.cardTab.active {
  color: #0070f3;
  border-bottom: 2px solid #0070f3;
  background: white;
}

/* 功能卡片容器样式 */
.walletConnect,
.transaction,
.contractInteraction,
.tokenBalance {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 结果显示区域样式 */
.resultSection {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.resultContent {
  background: #f5f5f5;
  padding: 15px;
  border-radius: 4px;
  border-left: 4px solid #0070f3;
  font-family: monospace;
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  max-height: 300px;
  overflow-y: auto;
}

/* 信息说明区域样式 */
.infoSection {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.infoSection ul {
  padding-left: 20px;
  margin: 0;
}

.infoSection li {
  margin-bottom: 8px;
  color: #555;
  list-style-type: disc;
}

.infoSection li:before {
  content: "• ";
  color: #0070f3;
  font-weight: bold;
}

/* 提示文本样式 */
.note {
  color: #666;
  font-size: 12px;
  margin-top: 8px;
  font-style: italic;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .content {
    padding: 15px;
  }
  
  .cardTabs {
    flex-wrap: nowrap;
    justify-content: flex-start;
  }
  
  .cardTab {
    padding: 10px 16px;
    font-size: 13px;
  }
  
  .walletConnect,
  .transaction,
  .contractInteraction,
  .tokenBalance,
  .resultSection,
  .infoSection {
    padding: 15px;
  }
  
  h1 {
    font-size: 24px;
    margin-bottom: 20px;
  }
  
  h2 {
    font-size: 20px;
  }
  
  h3 {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .cardTab {
    padding: 8px 12px;
    font-size: 12px;
  }
  
  h1 {
    font-size: 20px;
  }
  
  .resultContent {
    font-size: 12px;
    padding: 10px;
  }
}